package com.shudai.largescreen.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.shudai.largescreen.pojo.Order;
import com.shudai.largescreen.pojo.User;
import com.shudai.largescreen.pojo.vo.NotSuExcelVo;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface NotSuExcelServiceMapper extends BaseMapper<Order> {
    @Select({
            "SELECT o.order_number orderId,d.customer_number userRecordId,o.receiver_shop_name shopName,o.order_time orderTime,o.user_order_times times,o.total_number totalNumber,o.amount amount \n" +
                    "FROM sd_order o ,sd_user_record d  where o.user_record_id = d.id and o.on_cancel = 0 and o.user_order_times is not null and o.order_state = 3\n" +
                    "GROUP BY o.id ,o.user_record_id ,o.receiver_shop_name,o.order_time,o.user_order_times,o.total_number,o.amount"
    })
    List<NotSuExcelVo> findAllExcel();
}
